import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useThemeStore = defineStore(
  'theme',
  () => {
    const themeInfo = ref(`--bg:#F8F8F8;--mainColor:#FF4757;--mainRgbColor:255,71,87;--subColor:#FFECED;--priceColor:#FF3838;`);

    const setTheme = (val: string) => {
      themeInfo.value = val;
    };

    const resetTheme = () => {
      themeInfo.value = '';
    };


    return {
      themeInfo,
      setTheme,
      resetTheme,
    };
  },
  {
    persist: true
  }
);
